<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="专业代码" prop="mcMajorCode">
        <el-input
          v-model="queryParams.mcMajorCode"
          placeholder="请输入专业代码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专业名称" prop="mcMajorName">
        <el-input
          v-model="queryParams.mcMajorName"
          placeholder="请输入专业名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专业英文名称" prop="mcMajorEnglishName">
        <el-input
          v-model="queryParams.mcMajorEnglishName"
          placeholder="请输入专业英文名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="院系编码" prop="mcDeptCode">
        <el-input
          v-model="queryParams.mcDeptCode"
          placeholder="请输入院系编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学科门类码" prop="mcDegreeType">
        <el-input
          v-model="queryParams.mcDegreeType"
          placeholder="请输入学科门类码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="唯一标识" prop="mcUniqueId">
        <el-input
          v-model="queryParams.mcUniqueId"
          placeholder="请输入唯一标识"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="校内专业名称" prop="mcInternalName">
        <el-input
          v-model="queryParams.mcInternalName"
          placeholder="请输入校内专业名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="设置年份" prop="mcYearOfEstablishment">
        <el-input
          v-model="queryParams.mcYearOfEstablishment"
          placeholder="请输入设置年份"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学制" prop="mcStudyLength">
        <el-input
          v-model="queryParams.mcStudyLength"
          placeholder="请输入学制"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="允许修业年限" prop="mcMaxStudyYears">
        <el-input
          v-model="queryParams.mcMaxStudyYears"
          placeholder="请输入允许修业年限"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="招生状态" prop="mcRecruitStatus">
        <el-input
          v-model="queryParams.mcRecruitStatus"
          placeholder="请输入招生状态"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专业级别" prop="mcMajorLevel">
        <el-input
          v-model="queryParams.mcMajorLevel"
          placeholder="请输入专业级别"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="校内专业编码" prop="mcInternalCode">
        <el-input
          v-model="queryParams.mcInternalCode"
          placeholder="请输入校内专业编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="招生所属大类" prop="mcEnrollmentCategory">
        <el-input
          v-model="queryParams.mcEnrollmentCategory"
          placeholder="请输入招生所属大类"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专业建设项目名称1" prop="mcProjectName1">
        <el-input
          v-model="queryParams.mcProjectName1"
          placeholder="请输入专业建设项目名称1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="时间">
        <el-date-picker
          v-model="daterangeMcProjectTime1"
          style="width: 240px"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="等级" prop="mcProjectLevel1">
        <el-select v-model="queryParams.mcProjectLevel1" placeholder="请选择等级" clearable>
          <el-option
            v-for="dict in dict.type.mc_project_level_1"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="授予部门" prop="mcAwardingDepartment1">
        <el-input
          v-model="queryParams.mcAwardingDepartment1"
          placeholder="请输入授予部门"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专业建设项目名称2" prop="mcProjectName2">
        <el-input
          v-model="queryParams.mcProjectName2"
          placeholder="请输入专业建设项目名称2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="时间">
        <el-date-picker
          v-model="daterangeMcProjectTime2"
          style="width: 240px"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="等级" prop="mcProjectLevel2">
        <el-select v-model="queryParams.mcProjectLevel2" placeholder="请选择等级" clearable>
          <el-option
            v-for="dict in dict.type.mc_project_level_1"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="授予部门" prop="mcAwardingDepartment2">
        <el-input
          v-model="queryParams.mcAwardingDepartment2"
          placeholder="请输入授予部门"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="备注" prop="mcRemarks">
        <el-input
          v-model="queryParams.mcRemarks"
          placeholder="请输入备注"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核状态" prop="auditStatus">
        <el-select v-model="queryParams.auditStatus" placeholder="请选择审核状态" clearable>
          <el-option
            v-for="dict in dict.type.audit_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="未通过原因" prop="rejectionReason">
        <el-input
          v-model="queryParams.rejectionReason"
          placeholder="请输入未通过原因"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="用户ID" prop="userId">
        <el-input
          v-model="queryParams.userId"
          placeholder="请输入用户ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="部门id" prop="deptId">
        <el-input
          v-model="queryParams.deptId"
          placeholder="请输入部门id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="时间戳" prop="timePin">
        <el-input
          v-model="queryParams.timePin"
          placeholder="请输入时间戳"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['construction:construction:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['construction:construction:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['construction:construction:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['construction:construction:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="constructionList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键" align="center" prop="mcId" />
      <el-table-column label="专业代码" align="center" prop="mcMajorCode" />
      <el-table-column label="专业名称" align="center" prop="mcMajorName" />
      <el-table-column label="专业英文名称" align="center" prop="mcMajorEnglishName" />
      <el-table-column label="院系编码" align="center" prop="mcDeptCode" />
      <el-table-column label="学科门类码" align="center" prop="mcDegreeType" />
      <el-table-column label="唯一标识" align="center" prop="mcUniqueId" />
      <el-table-column label="校内专业名称" align="center" prop="mcInternalName" />
      <el-table-column label="设置年份" align="center" prop="mcYearOfEstablishment" />
      <el-table-column label="学制" align="center" prop="mcStudyLength" />
      <el-table-column label="允许修业年限" align="center" prop="mcMaxStudyYears" />
      <el-table-column label="招生状态" align="center" prop="mcRecruitStatus" />
      <el-table-column label="专业级别" align="center" prop="mcMajorLevel" />
      <el-table-column label="校内专业编码" align="center" prop="mcInternalCode" />
      <el-table-column label="招生所属大类" align="center" prop="mcEnrollmentCategory" />
      <el-table-column label="专业建设项目名称1" align="center" prop="mcProjectName1" />
      <el-table-column label="时间" align="center" prop="mcProjectTime1" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.mcProjectTime1, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="等级" align="center" prop="mcProjectLevel1">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.mc_project_level_1" :value="scope.row.mcProjectLevel1"/>
        </template>
      </el-table-column>
      <el-table-column label="授予部门" align="center" prop="mcAwardingDepartment1" />
      <el-table-column label="专业建设项目名称2" align="center" prop="mcProjectName2" />
      <el-table-column label="时间" align="center" prop="mcProjectTime2" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.mcProjectTime2, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="等级" align="center" prop="mcProjectLevel2">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.mc_project_level_1" :value="scope.row.mcProjectLevel2"/>
        </template>
      </el-table-column>
      <el-table-column label="授予部门" align="center" prop="mcAwardingDepartment2" />
      <el-table-column label="备注" align="center" prop="mcRemarks" />
      <el-table-column label="审核状态" align="center" prop="auditStatus">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.audit_status" :value="scope.row.auditStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="未通过原因" align="center" prop="rejectionReason" />
      <el-table-column label="用户ID" align="center" prop="userId" />
      <el-table-column label="部门id" align="center" prop="deptId" />
      <el-table-column label="更新时间" align="center" prop="updateTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="佐证材料" align="center" prop="wdUplocal" />
      <el-table-column label="时间戳" align="center" prop="timePin" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['construction:construction:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['construction:construction:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改专业建设情况对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="专业代码" prop="mcMajorCode">
          <el-input v-model="form.mcMajorCode" placeholder="请输入专业代码" />
        </el-form-item>
        <el-form-item label="专业名称" prop="mcMajorName">
          <el-input v-model="form.mcMajorName" placeholder="请输入专业名称" />
        </el-form-item>
        <el-form-item label="专业英文名称" prop="mcMajorEnglishName">
          <el-input v-model="form.mcMajorEnglishName" placeholder="请输入专业英文名称" />
        </el-form-item>
        <el-form-item label="院系编码" prop="mcDeptCode">
          <el-input v-model="form.mcDeptCode" placeholder="请输入院系编码" />
        </el-form-item>
        <el-form-item label="学科门类码" prop="mcDegreeType">
          <el-input v-model="form.mcDegreeType" placeholder="请输入学科门类码" />
        </el-form-item>
        <el-form-item label="唯一标识" prop="mcUniqueId">
          <el-input v-model="form.mcUniqueId" placeholder="请输入唯一标识" />
        </el-form-item>
        <el-form-item label="校内专业名称" prop="mcInternalName">
          <el-input v-model="form.mcInternalName" placeholder="请输入校内专业名称" />
        </el-form-item>
        <el-form-item label="设置年份" prop="mcYearOfEstablishment">
          <el-input v-model="form.mcYearOfEstablishment" placeholder="请输入设置年份" />
        </el-form-item>
        <el-form-item label="学制" prop="mcStudyLength">
          <el-input v-model="form.mcStudyLength" placeholder="请输入学制" />
        </el-form-item>
        <el-form-item label="允许修业年限" prop="mcMaxStudyYears">
          <el-input v-model="form.mcMaxStudyYears" placeholder="请输入允许修业年限" />
        </el-form-item>
        <el-form-item label="招生状态" prop="mcRecruitStatus">
          <el-input v-model="form.mcRecruitStatus" placeholder="请输入招生状态" />
        </el-form-item>
        <el-form-item label="专业级别" prop="mcMajorLevel">
          <el-input v-model="form.mcMajorLevel" placeholder="请输入专业级别" />
        </el-form-item>
        <el-form-item label="校内专业编码" prop="mcInternalCode">
          <el-input v-model="form.mcInternalCode" placeholder="请输入校内专业编码" />
        </el-form-item>
        <el-form-item label="招生所属大类" prop="mcEnrollmentCategory">
          <el-input v-model="form.mcEnrollmentCategory" placeholder="请输入招生所属大类" />
        </el-form-item>
        <el-form-item label="专业建设项目名称1" prop="mcProjectName1">
          <el-input v-model="form.mcProjectName1" placeholder="请输入专业建设项目名称1" />
        </el-form-item>
        <el-form-item label="时间" prop="mcProjectTime1">
          <el-date-picker clearable
            v-model="form.mcProjectTime1"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="等级" prop="mcProjectLevel1">
          <el-select v-model="form.mcProjectLevel1" placeholder="请选择等级">
            <el-option
              v-for="dict in dict.type.mc_project_level_1"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="授予部门" prop="mcAwardingDepartment1">
          <el-input v-model="form.mcAwardingDepartment1" placeholder="请输入授予部门" />
        </el-form-item>
        <el-form-item label="专业建设项目名称2" prop="mcProjectName2">
          <el-input v-model="form.mcProjectName2" placeholder="请输入专业建设项目名称2" />
        </el-form-item>
        <el-form-item label="时间" prop="mcProjectTime2">
          <el-date-picker clearable
            v-model="form.mcProjectTime2"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="等级" prop="mcProjectLevel2">
          <el-select v-model="form.mcProjectLevel2" placeholder="请选择等级">
            <el-option
              v-for="dict in dict.type.mc_project_level_1"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="授予部门" prop="mcAwardingDepartment2">
          <el-input v-model="form.mcAwardingDepartment2" placeholder="请输入授予部门" />
        </el-form-item>
        <el-form-item label="备注" prop="mcRemarks">
          <el-input v-model="form.mcRemarks" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="审核状态" prop="auditStatus">
          <el-radio-group v-model="form.auditStatus">
            <el-radio
              v-for="dict in dict.type.audit_status"
              :key="dict.value"
              :label="dict.value"
            >{{dict.label}}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="未通过原因" prop="rejectionReason">
          <el-input v-model="form.rejectionReason" placeholder="请输入未通过原因" />
        </el-form-item>
        <el-form-item label="用户ID" prop="userId">
          <el-input v-model="form.userId" placeholder="请输入用户ID" />
        </el-form-item>
        <el-form-item label="部门id" prop="deptId">
          <el-input v-model="form.deptId" placeholder="请输入部门id" />
        </el-form-item>
        <el-form-item label="佐证材料" prop="wdUplocal">
          <file-upload v-model="form.wdUplocal"/>
        </el-form-item>
        <el-form-item label="时间戳" prop="timePin">
          <el-input v-model="form.timePin" placeholder="请输入时间戳" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listConstruction, getConstruction, delConstruction, addConstruction, updateConstruction } from "@/api/construction/construction";

export default {
  name: "Construction",
  dicts: ['mc_project_level_1', 'audit_status'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 专业建设情况表格数据
      constructionList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 时间戳时间范围
      daterangeMcProjectTime1: [],
      // 时间戳时间范围
      daterangeMcProjectTime2: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        mcMajorCode: null,
        mcMajorName: null,
        mcMajorEnglishName: null,
        mcDeptCode: null,
        mcDegreeType: null,
        mcUniqueId: null,
        mcInternalName: null,
        mcYearOfEstablishment: null,
        mcStudyLength: null,
        mcMaxStudyYears: null,
        mcRecruitStatus: null,
        mcMajorLevel: null,
        mcInternalCode: null,
        mcEnrollmentCategory: null,
        mcProjectName1: null,
        mcProjectTime1: null,
        mcProjectLevel1: null,
        mcAwardingDepartment1: null,
        mcProjectName2: null,
        mcProjectTime2: null,
        mcProjectLevel2: null,
        mcAwardingDepartment2: null,
        mcRemarks: null,
        auditStatus: null,
        rejectionReason: null,
        userId: null,
        deptId: null,
        wdUplocal: null,
        timePin: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询专业建设情况列表 */
    getList() {
      this.loading = true;
      this.queryParams.params = {};
      if (null != this.daterangeMcProjectTime1 && '' != this.daterangeMcProjectTime1) {
        this.queryParams.params["beginMcProjectTime1"] = this.daterangeMcProjectTime1[0];
        this.queryParams.params["endMcProjectTime1"] = this.daterangeMcProjectTime1[1];
      }
      if (null != this.daterangeMcProjectTime2 && '' != this.daterangeMcProjectTime2) {
        this.queryParams.params["beginMcProjectTime2"] = this.daterangeMcProjectTime2[0];
        this.queryParams.params["endMcProjectTime2"] = this.daterangeMcProjectTime2[1];
      }
      listConstruction(this.queryParams).then(response => {
        this.constructionList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        mcId: null,
        mcMajorCode: null,
        mcMajorName: null,
        mcMajorEnglishName: null,
        mcDeptCode: null,
        mcDegreeType: null,
        mcUniqueId: null,
        mcInternalName: null,
        mcYearOfEstablishment: null,
        mcStudyLength: null,
        mcMaxStudyYears: null,
        mcRecruitStatus: null,
        mcMajorLevel: null,
        mcInternalCode: null,
        mcEnrollmentCategory: null,
        mcProjectName1: null,
        mcProjectTime1: null,
        mcProjectLevel1: null,
        mcAwardingDepartment1: null,
        mcProjectName2: null,
        mcProjectTime2: null,
        mcProjectLevel2: null,
        mcAwardingDepartment2: null,
        mcRemarks: null,
        auditStatus: null,
        rejectionReason: null,
        userId: null,
        deptId: null,
        updateTime: null,
        wdUplocal: null,
        timePin: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeMcProjectTime1 = [];
      this.daterangeMcProjectTime2 = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.mcId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加专业建设情况";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const mcId = row.mcId || this.ids
      getConstruction(mcId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改专业建设情况";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.mcId != null) {
            updateConstruction(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addConstruction(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const mcIds = row.mcId || this.ids;
      this.$modal.confirm('是否确认删除专业建设情况编号为"' + mcIds + '"的数据项？').then(function() {
        return delConstruction(mcIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('construction/construction/export', {
        ...this.queryParams
      }, `construction_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
